﻿@model KL.Store.Web.Models.CartCheckOutModel
@using KL.Store.Core
@{
    ViewBag.Title = "Sepet Onayla";
    Layout = "~/Views/Shared/" + Parameters.Layout + ".cshtml";
    var showMenu = false;
    var menuStyle = "";
    var contentStyle = "";
    if (showMenu)
    {
        menuStyle = "hidden-xs hidden-sm col-md-3 col-lg-2 left first last";
        contentStyle = "col-xs-12 col-sm-12 col-md-9 col-lg-10 left";
        if (Parameters.Theme == "DK" || Parameters.Theme == "EO")
        {
            menuStyle = "hidden-xs hidden-sm col-md-4 col-lg-3 left first last";
            contentStyle = "col-xs-12 col-sm-12 col-md-8 col-lg-9 left";
        }
    }
    else
    {
        menuStyle = "";
        contentStyle = "col-xs-12 col-sm-12 col-md-12 col-lg-12 first last";
        if (Parameters.Theme == "WU")
        {
            contentStyle = "col-xs-12 col-sm-12 col-md-12 col-lg-12";
        }
    }
}
@if (Parameters.Theme == "DK" || Parameters.Theme == "EO")
{
    <div class="breadcrumb col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="bcBorder"></div>
        <div class="bcLinks">
            <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                <a href="/" itemprop="url">
                    <span itemprop="title">Anasayfa</span>
                </a>›
            </div>
            <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                <a href="/Cart/Index" itemprop="url">
                    <span itemprop="title">Sepetim</span>
                </a>›
            </div>
            <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
                <a href="/Cart/Checkout" itemprop="url">
                    <span itemprop="title">Sepeti Onayla</span>
                </a>
            </div>
        </div>
        <div class="bcBorder"></div>
    </div>
    <div class="clearfix"></div>
}
@if (Parameters.Theme != "HA" && showMenu)
{
    <div class="@menuStyle">
        @{Html.RenderAction("Categories", "Partials");}
        @{Html.RenderAction("Information", "Partials"); }
        @{Html.RenderAction("Account", "Partials"); }
    </div>
}
<div class="@contentStyle">
    <div class="content">
        <div class="pay-processes hidden-xs hidden-sm">
            <span class="process1">
                <img src="/Images/@Parameters.Theme/process1-deactive.jpg" />
                Sepetim
            </span>
            <span class="process2 active">
                <img src="/Images/@Parameters.Theme/process2-active.jpg" />
                Teslimat ve Ödeme
            </span>
            <span class="process3">
                <img src="/Images/@Parameters.Theme/process3-deactive.jpg" />
                Sipariş Onayı
            </span>
        </div>
        <div class="CheckOutHeadText">
            @Html.Raw(Parameters.CheckOutHeadText)
        </div>
        @{Html.RenderAction("ManageContentLink", "Partials", new { id = 441 });}
        <div id="checkoutForm">
            @{
                Html.RenderAction("GetCheckOut", "Cart");
            }
        </div>
        <div id="dialog-form" title="Adres">
        </div>
        <div id="dialog-contract" title="Sözleşme">
        </div>
    </div>
</div>
<script type="text/javascript">
    function toplamClick(i)
    {
        if (i == 1)
        {
            $('#PartialPayment').css("visibility", "hidden");
        }
        else
        {
            $('#PartialPayment').css("visibility", "visible");
            $('#PartialPayment').focus();
        }
    }

    var lastKey = 0;

    function KeyUp(This)
    {
        var chars = $(This).val().length;
        var max = $(This).attr("maxlength");
        if (chars == 0 && lastKey == 8)
        {
            $(This).parent().prev('div').find('input.number').focus();
        }
        if (chars == max)
        {
            $(This).parent().next('div').find('input.number').focus();
        }
    }

    function KeyDown(e)
    {
        lastKey = e.keyCode;
        if (!(e.keyCode >= 48 && e.keyCode <= 57) && !(e.keyCode >= 96 && e.keyCode <= 105) && (e.keyCode != 9 && e.keyCode != 8 && e.keyCode != 46))
        {
            return false;
        }
    }
    $(document).ready(function ()
    {
        $('#frmRefresh')[0].reset();
    });
</script>
